compile_check = true; $s->debugging = false; $s->caching = false; $s->cache_lifetime=3600; $s->template_dir = './templates/'; $s->compile_dir= './templates_c/'; $s->cache_dir= './templates_cache/'; if ($_SERVER['REQUEST_METHOD']=='POST') { $bValidPwd = false; // Setup variables $sUserId = @$_POST["userid"]; $sPassWd = @$_POST["passwd"]; if (!($bValidPwd)) { $sUserId = (!get_magic_quotes_gpc()) ? addslashes($sUserId) : $sUserId; $sSql = "SELECT * FROM `tag`"; $sSql .= " WHERE `email` = '" . $sUserId . "'"; $rs = mysql_query($sSql) or die(""); if (mysql_num_rows($rs) > 0) { $row = mysql_fetch_array($rs); if ($row["password"] == $sPassWd) { $_SESSION["project1_tagid"] = $row["tagid"]; $_SESSION["project1_nev"] = $row["nev"]; $bValidPwd = true; } } mysql_free_result($rs); } if ($bValidPwd) { // Write cookies if (@$_POST["rememberme"] <> "") { setCookie("project1_tagemail", $row[email], time()+365*24*60*60); // change cookie expiry time here } $_SESSION["project1_status"] = "login_citymix10"; //redirect request if (!empty($_SESSION["redirect"])) { header("Location: ".$_SESSION["redirect"].""); exit; } } else { doLogout(); $site=array(); $site["title"]="City Mix 10 Zene Klub"; $site["title"].=" - Bejelentkezés"; $site["error"]="Hibás email vagy jelszó!"; $site["header_text"]="Szeretettel köszöntünk a megújult City Mix 10 lapon."; $s->assign("site",$site); $s->display('bejelentkezes.html'); exit; } } if ($s->is_cached('index.html')) { $s->display('index.html'); exit; } $site=array(); $site["title"]="City Mix 10 Zene Klub"; $site["title"].=" - Főoldal"; $site["header_text"]="Szeretettel köszöntünk a megújult City Mix 10 lapon."; $site["login"]=$_SESSION["project1_status"]; $s->assign("site",$site); $s->display('index.html'); ?>